﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;

using ERPStore.Web.Routing;

namespace ERPStore.Web.Html
{
	public static class FeedbackExtensions
	{
		public static MvcHtmlString ShowFeedbackForm(this HtmlHelper helper)
		{
			return helper.Action<Diagnostics.Controllers.FeedbackController>(a => a.ShowForm());
		}

		public static MvcForm BeginFeedbackForm(this AjaxHelper ajax, AjaxOptions options, object htmlAttributes)
		{
			return ajax.BeginERPStoreRouteForm("DiagnosticFeedback", new { action = "ShowForm" }, options, htmlAttributes);
		}

		public static MvcForm BeginFeedbackForm(this HtmlHelper helper, object htmlAttributes = null)
		{
			return helper.BeginERPStoreRouteForm("DiagnosticFeedback", FormMethod.Post, htmlAttributes);
		}

	}
}
